const net = require("net");
const server = net.createServer();
server.listen(9527);
server.on("listening", () => {
  console.log("链接1111456465456");
});
server.on("connection", (socket) => {
  console.log("有人连接过来了");
  socket.on("data", (chunk) => {
    console.log(chunk.toString("utf-8"));
    socket.write(`HTTP/1.1 200 OK
Content-Type: text/plain


<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    你好啊!
</body>
</html>`);
    socket.end();
  });
});
